/*
 * @(#)ArrayCollectionFrequencyIterator.java	1.0 08/01/07
 *
 * Copyright 2007 Fabio Gasparetti. All rights reserved.
 */

package org.tabularium.text.nlp;

import java.util.Iterator;

/**
 * Iterator implementation.  
 * 
 * @author Fabio Gasparetti
 * @version 1.0, 08/01/07
 */ 
public class ArrayCollectionFrequencyIterator implements Iterator {
	private CollectionFrequency.TermFreq[] termFreqs;
	private int currIdx;
	
	ArrayCollectionFrequencyIterator(CollectionFrequency.TermFreq[] termFreqs) {
		this.termFreqs = termFreqs;
		currIdx = 0;
	}

	public boolean hasNext() {
		return currIdx < termFreqs.length;
	}

	public Object next() {
		if (currIdx < termFreqs.length)
			return termFreqs[currIdx++];
		return null;
	}

	public void remove() {
		// TODO Auto-generated method stub
		
	}
}
